package Java练习.面向对象综合练习.基础;

public class Goods {
    private int id;
    private String goodsName;
    private int prize;
    private int stock;


    //空参
    public Goods(){}
    //带参数构造方法

    public Goods(int id, String goodsName, int prize, int stock) {
        this.id = id;
        this.goodsName = goodsName;
        this.prize = prize;
        this.stock = stock;
    }
    //get和set方法

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public int getPrize() {
        return prize;
    }

    public void setPrize(int prize) {
        this.prize = prize;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }
}
